﻿using System;
using System.Threading;
using System.Web.Http;
using AttributeRouting.Web.Http;
using Gean;
using Gean.Wrapper;
using Pansoft.Authority.Entities;
using Pansoft.Authority.Interfaces;
using Pansoft.HIME.Base.Params;
using Pansoft.HIME.Base.ViewModels;
using Pansoft.HIME.Base.Wrapper;
using Pansoft.HIME.Controllers.Attributes;

namespace Pansoft.HIME.Controllers.Api.OrganizationManager
{
    public class StaffController : ApiController, IStaffController
    {
        #region Implementation of ICRUDBaseController<StaffBase,in string>

        /// <summary>创建一条实体数据
        /// </summary>
        public bool Create(StaffBase entity)
        {
            throw new NotImplementedException();
        }

        /// <summary>删除一条实体数据
        /// </summary>
        public bool Delete(string id)
        {
            throw new NotImplementedException();
        }

        /// <summary>更新一条实体数据
        /// </summary>
        public bool Update(StaffBase entity)
        {
            throw new NotImplementedException();
        }

        /// <summary>按基础索引键进行查询
        /// </summary>
        public StaffBase Retrieve(string id, bool containDeleted = false)
        {
            throw new NotImplementedException();
        }

        #endregion

        /// <summary>根据指定的组织Id获取该组织的所有员工列表
        /// </summary>
        /// <param name="args">查询参数，其中Id表示指定的组织Id</param>
        /// <returns>该组织的所有员工列表</returns>
        [POST("Staff/List")]
        [StaffAuthorize(613)]
        public StaffViewModel[] List(PostParam args)
        {
            return Mocks.GetDemoStaffArray(args.Id);
        }

    }
}